<?php
/**
系统常量，预定义,魔法常量
 */
header('Content-type:text/html;charset=utf-8');
echo __LINE__;
echo __LINE__;
echo __LINE__;
echo __LINE__;
echo __LINE__;
echo "<br>";
echo __FILE__;
echo "<br>";
echo __DIR__;
echo "下一个上场的是3.0.php<br>";
include "3.0.php";  //包含另一个文件
echo "最后";
Foo();
Fun();
function Foo(){
    var_dump(__FUNCTION__);
}
function Fun(){
    var_dump(__FUNCTION__);
}

//function P(){
//
//}
//
//$p = new P();


class P{
    public $name = 10;
    public function foo(){
        var_dump(__METHOD__);
    }
}
$p = new P();
var_dump($p->name);
$p->foo();

var_dump(PHP_VERSION);
var_dump(PHP_OS);